/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAL;

import Util.HibernateUtil;
import java.math.BigDecimal;
import java.util.List;
import org.hibernate.Query;

    
    
/**
 *
 * @author DungLuu
 */
public class CategoryDAOImp extends GenericDAOImpl<Category, BigDecimal> implements CategoryDAO {
 
    @Override
    public Category findByID(Integer id) {
        Category category = null;
        String sql = "SELECT c FROM Category c WHERE c.CategoryId = :id";
        Query query = HibernateUtil.getSession().createQuery(sql).setParameter("id",id);
        category = findOne(query);
        return category;
    }   

    @Override
    public List<Category> getAllCat() {
        List<Category> catList = null;
        
        return catList;
    }

   
    }
}
